
import Fetch from "../utils/fetch";
import Request from "../utils/request";

// 首页轮播
export const banner = () => Request({
    url: "/api/banner",
    headers: {
        DeviceType: 'H5'
    }
})

// 首页列表
export const cartlist = () => Fetch.get("/recommend/appIndex")

// 讲师关注
export const teacherCollect = (data) => Fetch.get(`/teacher/collect/${data}`)

// 讲师列表
export const teacherList = (data) => Fetch.get(`/collect/${data}`)
// 讲师列表取消关注
export const noteacher = (data) => Fetch.get(`/collect/cancel/${data}/2`)


// 课程详情
export const courceId = (data) => Request({
    url: `/api/courseInfo/basis_id=${data}`,
    method: "get"
})
// 课程页的列表
export const courseClassify = () => Request({
    url: `/api/courseClassify`,
})
// 课程的筛选分类
export const courseBasis = () => Request({
    url: `/api/courseBasis`,
    method: "get"
})



// 分享
export const share = () => Fetch.post("/public/share")

// 用户userinfo
export const userinfo = () => Fetch.post("/userinfo")

// user信息
export const usercenter = () => Fetch.post("/getUCenterinfo")

// 获取验证码
// export const smsverification = (data) => Fetch.post("/smsCode", data)
export const smsverification = (data) => Request({
    url: `/api/smsCode`,
    method: "post",
    params: data,
})

// 验证码登录
// export const verificationLogin = (data) => Fetch.post("/login", data)
export const verificationLogin = (data) => Request({
    url: `/api/login`,
    method: "post",
    params: data,
})

// 确认密码 修改密码
// export const actionsPassword = () => Fetch.post("/password", data)
export const actionsPassword = (data) => Request({
    url: `/api/password`,
    method: "post",
    params: data,
})


